package com.biaobiaoqi.scoreanalysis.hibernate.bean;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
@Entity
public class Course extends BaseBean {
	@Column(nullable = false, unique=true)
	private String name;
 	@ManyToOne
 	@JoinColumn(nullable = false)
 	private ClazzType belongClazzType;
	@ManyToMany(mappedBy="courses")
	private List<Examination> examinations=new ArrayList<Examination>();
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public ClazzType getBelongClazzType() {
		return belongClazzType;
	}

	public void setBelongClazzType(ClazzType belongClazzType) {
		this.belongClazzType = belongClazzType;
	}

	public List<Examination> getExaminations() {
		return examinations;
	}

	public void setExaminations(List<Examination> examinations) {
		this.examinations = examinations;
	}
}
